package com.qingzhuge.dto.response;

import com.qingzhuge.common.HttpCode;
import lombok.*;
import lombok.experimental.Accessors;

/**
 * @author : zero.xiao
 * @date :2019-07-14 09:34
 * @description :
 * @modified :
 * @since : 1.0.0
 */
@Builder
@ToString
@Setter
@Getter
@Accessors(chain = true)
@AllArgsConstructor
public class ResponseBodyDto<T> extends ResponseDto {
    private T data;
    private Integer code = HttpCode.OK.value();
    private String message =HttpCode.OK.message();

    public ResponseBodyDto() {
    }

    public ResponseBodyDto(T data) {
        this.data = data;
    }

    public ResponseBodyDto(T data, String message) {
        this.data = data;
        this.message = message;
    }
}
